#ifndef __HDVB_HUFFMAN_H
#define __HDVB_HUFFMAN_H
/*
    hdvb - Library for building sophisticated DVB applications
    Copyright (C) 2012 Tony Houghton <h@realh.co.uk>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

/* Freesat Huffman decoding */

#include <glib.h>

G_BEGIN_DECLS

#define H_HUFFMAN_FAIL_STRING " --FAIL: "

typedef struct {
    guint8 left, right;
} HdvbHuffmanNode;

extern HdvbHuffmanNode *hdvb_freesat_huffman_table1[];
extern HdvbHuffmanNode *hdvb_freesat_huffman_table2[];

char *hdvb_huffman_decode(const guint8 *input, gsize input_len,
        HdvbHuffmanNode **o1table);
        
G_END_DECLS

#endif /* __HDVB_HUFFMAN_H */
